import { api, all } from '@/api/base'

export function init() {
    return all([isVip(), fundOpen(), getMyFund({})])
}


export function login(request) {
    return api({
        url: `/SysLoginInfo/Login?account=${request.username}&pwd=${request.password}`,
        method: "post"
    })
}

/**.
 * 获取用户信息
 */
export function isVip() {
    return api({
        url: `/UserInfo/IsVip`,
        method: "post"
    })
}

/**
 * 获取自选基金列表
 * @param {} request 
 * @returns 
 */
export function getMyFund(request) {
    return api({
        url: `/UserFund/getMyFund`,
        method: "post",
        data: request || {}
    })
}

/**
 * 获取自选基金列表
 * @param {} request 
 * @returns 
 */
export function fundOpen() {
    return api({
        url: `/ComService/FundOpen`,
        method: "post"
    })
}